package org.example.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.RocketMQTransactionListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @Auther:Liu
 * @Testname:ConsumerTransactionListener
 * @Date:2025/8/25 15:09
 */
@Component
@Slf4j
@RocketMQMessageListener(consumerGroup = "transaction", topic = "TopicC",
        selectorExpression = "*")
public class ConsumerTransactionListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        log.info("开始消费");
        log.info("消费信息:{}", s);
    }
}
